home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Audio / Patchmix / XWindowsSource / list.h < prev    next >
C/C++ Source or Header  |  1992-03-28  |  894b  |  44 lines

  1. /*  $Header: list.h,v 1.1 90/08/27 17:10:50 mara Exp $
  2.  *
  3.  *  list.h
  4.  *
  5.  *  Written by Mara Helmuth
  6.  *
  7.  *  Description: List class declaration 
  8.  *      for Cmix X graphical interface
  9.  * 
  10.  *  $Log:    list.h,v $
  11.  * Revision 1.1  90/08/27  17:10:50  mara
  12.  * Initial revision
  13.  * 
  14.  * Revision 1.2  90/01/30  11:07:05  mara
  15.  * *** empty log message ***
  16.  * 
  17.  * Revision 1.1  90/01/21  12:42:59  mara
  18.  * Initial revision
  19.  * 
  20.  */
  21.  
  22.  
  23. class node {
  24.     friend class list;
  25.     private:
  26.         node* next;
  27.         char* contents;
  28. };
  29.  
  30. class list {
  31.     private:
  32.         node* head;
  33.         node* top;
  34.         int size;
  35.     public: 
  36.         list(int s) { head = 0; top = 0; size = s; };
  37.         void insert(char*);  // put item into beginning of list
  38.         void append(char*);  // put item at end of list
  39.         char* get();         // get item from list
  40.         void rewind_list() { head = top; }; // go to beg of list
  41.         void clear();        // remove list
  42.         ~list() { clear(); };
  43. };
  44.